package com.jinly.ryder.flow.dao.entity;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.jinly.ryder.common.dao.entity.BaseDO;
import com.jinly.ryder.flow.service.model.ApplyStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 流程申请表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "flow_apply", autoResultMap = true)
public class FlowApplyDO extends BaseDO {

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 流程规则ID
     */
    @TableField(value = "flow_rule_id")
    private Integer flowRuleId;

    /**
     * 流程名称
     */
    @TableField(value = "flow_name")
    private String flowName;

    /**
     * 应用名称
     */
    @TableField(value = "app_name")
    private String appName;

    /**
     * 申请人
     */
    @TableField(value = "apply_user_id")
    private Long applyUserId;

    /**
     * 申请标题
     */
    @TableField(value = "apply_title")
    private String applyTitle;

    /**
     * 申请状态
     */
    @TableField(value = "apply_status")
    private ApplyStatus applyStatus;

    /**
     * 申请表单数据
     */
    @TableField(value = "apply_form_data", typeHandler = FastjsonTypeHandler.class)
    private JSONObject applyFormData;

    /**
     * 申请备注
     */
    @TableField(value = "remark")
    private String remark;


}
